/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewJPanel.java
 *
 * Created on Apr 1, 2010, 4:36:29 AM
 */

package chat.client.resources;

import javax.swing.JLabel;
import javax.swing.JProgressBar;

/**
 *
 * @author seb
 */
public class ProgressBar extends javax.swing.JPanel {

    public JLabel getjLabel1() {
        return jLabel1;
    }

    public void setjLabel1(JLabel jLabel1) {
        this.jLabel1 = jLabel1;
    }

    public JProgressBar getjProgressBar1() {
        return jProgressBar1;
    }

    public void setjProgressBar1(JProgressBar jProgressBar1) {
        this.jProgressBar1 = jProgressBar1;
    }

    
    /** Creates new form NewJPanel */
    public ProgressBar(String text) {
        initComponents();
        jLabel1.setText(text);
        jProgressBar1.setValue(0);
        jProgressBar1.setStringPainted(true);
        jProgressBar1.setMaximum(100);
        jProgressBar1.setMinimum(0);
    }

    public void refrech(int value) {
        jProgressBar1.setValue(value);
        this.revalidate();
        this.repaint();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jProgressBar1 = new javax.swing.JProgressBar();

        setLayout(new java.awt.GridLayout());

        jLabel1.setText("jLabel1");
        jLabel1.setName("jLabel1"); // NOI18N
        add(jLabel1);

        jProgressBar1.setName("jProgressBar1"); // NOI18N
        add(jProgressBar1);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JProgressBar jProgressBar1;
    // End of variables declaration//GEN-END:variables

}
